package com.yx;

import javax.servlet.ServletOutputStream;
import java.io.IOException;

public class ResponseServletOutputStream extends ServletOutputStream {
    private int pos=0;
    private byte[] bytes =new byte[1024];
    @Override
    public void write(int b) throws IOException {
        bytes[pos]=(byte)b;
        pos++;
    }

    public int getPos() {
        return pos;
    }

    public byte[] getBytes() {
        return bytes;
    }
}
